﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;

namespace arcchallenge.rot13.tests
{
    [TestFixture]
    public class test_Rot13Byte
    {
        [Test]
        public void Transform_capital_letters()
        {
            Assert.AreEqual(78, Rot13Transformation.Rot13Byte(65)); // A
            Assert.AreEqual(79, Rot13Transformation.Rot13Byte(66)); // B
            Assert.AreEqual(77, Rot13Transformation.Rot13Byte(90)); // Z
        }

        [Test]
        public void Transform_lowercase_letters()
        {
            Assert.AreEqual(110, Rot13Transformation.Rot13Byte(97)); // a
            Assert.AreEqual(111, Rot13Transformation.Rot13Byte(98)); // b
            Assert.AreEqual(109, Rot13Transformation.Rot13Byte(122)); // z
        }

        [Test]
        public void Ignore_non_letter_chars()
        {
            Assert.AreEqual(64, Rot13Transformation.Rot13Byte(64));
            Assert.AreEqual(91, Rot13Transformation.Rot13Byte(91));
            Assert.AreEqual(96, Rot13Transformation.Rot13Byte(96));
            Assert.AreEqual(123, Rot13Transformation.Rot13Byte(123));
        }
    }
}
